// 搜索条
.search {
  background: $color-white;
  border-bottom: 1px $color-lightGray solid;
  box-sizing: border-box;
  height: 64px;
  padding: 15px 20px 0;

  &-form {
    position: relative;
    width: 100%;
  }

  input {
    background: $color-background;
    border: 0;
    border-radius: 17px;
    height: 34px;
    line-height: 34px;
    padding: 0 15px 0 45px;
    width: 100%;
  }

  .addon {
    color: lighten($color-gray, 50%);
    display: block;
    height: 16px;
    left: 15px;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
    width: 16px;
  }

  .icon-search {
    background: url("../imgs/icon/icon_search.svg");
  }
  
  .icon-scan {
    background: url("../imgs/icon/icon_scan.svg");
    display: block;
    height: 24px;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translate(0, -50%);
    width: 24px;
  }
}

// 广告轮播
.swiper-container {
  height: 150px;
  width: 100%;

  .swiper-pagination {
    bottom: 0;
  }

  .swiper-pagination-bullet-active {
    background: $brand-primary;
  }

  .swiper-slide img {
    //width: 100%;
    height: 150px;
  }
}

// 筛选条
.filter {
  a:hover,
  a:focus {
    text-decoration: none;
  }
  ul.filterMenu {
    background: $color-white;
    border-bottom: 1px solid $color-lightGray;
    box-sizing: border-box;
    @include clearfix;

    li {
      height: 44px;
      float: left;
      line-height: 44px;
      position: relative;
      text-align: center;
      width: 33%;

      &:nth-child(2) {
        width: 34%;
      }

      &::after {
        background: $color-lightGray;
        content: '';
        height: 30px;
        position: absolute;
        right: 0;
        top: 7px;
        width: 1px;
      }

      &:nth-child(3):after {
        display: none;
      }

      i {
        font-size: 6px;
        line-height: 34px;
        margin-top: -5px;
      }
    }
  }
  ul.dropdown-menu {
    box-sizing: content-box;
    li {
      height: 26px;
      text-align: left;
      width: 100%;

      a {
        line-height: 26px;
      }

      &.divider {
        height: 1px;
        width: 100%;
      }

      &::after {
        display: none;
      }
    }
  }
}

// 当前位置
.currentPos {
  padding-top: 10px;
  padding-bottom: 10px;
}

// 充电站列表
.stationList {
  li {
    background: $color-white;
    border-top: 1px $color-lightGray solid;
    border-bottom: 1px $color-lightGray solid;
    margin-bottom: 10px;
    padding: 15px;
    position: relative;

    span.tag {
      background: $color-green;
      border-radius: 3px;
      color: $color-white;
      font-size: 60%;
      font-weight: normal;
      display: flex;
      height: 18px;
      line-height: 18px;
      margin-left: 10px;
      padding: 0 5px;
    }

    h4 {
      margin: 0 0 10px;
      display: flex;

      a {
        color: inherit;
      }
    }
    
    .exInfo {
      li {
        border: 0;
        display: inline-flex;
        margin-right: 5px;
        margin-bottom: 0;
        padding: 0;

        img {
          height: 18px;
          margin-right: 5px;
          width: 18px;
        }
      }
    }
  }

  .navi {
    border-left: 1px $color-lightGray solid;
    padding: 0 15px;
    position: absolute;
    right: 0;
    text-align: center;
    top: 50%;
    transform: translate(0, -50%);

    a {
      border-radius: 20px;
      margin-bottom: 5px;
    }

    h4 {
      line-height: 18px;
      margin-bottom: 0;
    }

    i {
      margin-right: 5px;
    }
  }
}

// 自定义modal
.modal-content {
  overflow: hidden;
}
#cost_des table {
  margin-bottom: 0;
}

// 信息盒子
.box {
  background: $color-white;
  //border-top: 1px solid $color-lightGray;
  //border-bottom: 1px solid $color-lightGray;
  margin-bottom: 10px;
  padding: 15px 0;

  @include clearfix;

  hr {
    margin: 15px 0;
  }
}

//--------- 充电站页面(station.html)
.stationView {
  img {
    width: 100%;
  }
}

// 导航
.navito {
  position: absolute;
  right: 15px;
  text-align: center;
  top: 50%;
  transform: translate(0, -50%);

  a {
    font-size: 150%;
  }

  p {
    margin-bottom: 0;
  }
}

// 费用信息
.cost {
  vertical-align: middle;

  img {
    width: 18px;
    vertical-align: middle;
  }

  i {
    color: $brand-info;
    margin-right: 2px;

    &.if-question {
      color: $gray-light;
    }
  }

  p {
    margin-bottom: 10px;

    &:last-of-type {
      margin-bottom: 0;
    }
  }

  .reserve {
    border-radius: 30px;
    padding: 10px 20px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translate(0, -50%);
  }
}

// 信息录入
.wl-form {
  margin-bottom: 10px;
  margin-left: -15px;
  margin-right: -15px;

  label {
    color: $color-lightGray;
    font-weight: normal;
    margin-bottom: 0;
  }

  .wl-form-group {
    background: $color-white;
    border: {
      top: 1px solid $color-lightGray;
      bottom: 1px solid $color-lightGray;
    }
    height: 44px;
    line-height: 44px;
    margin-bottom: 10px;
    padding: 0 5px;
    position: relative;

    input[type='text'],
    input[type='datetime-local'] {
      border: 0;
      height: 44px;
      padding: 0 15px 0 0;
      text-align: right;
      width: 100%;

      &:disabled {
        background: transparent;
      }
    }

    p {
      margin-bottom: 0;
      padding-right: 15px;
      text-align: right;
    }

    &.picker {
      &:after {
        background: url("../imgs/icon/right_arrow.png") no-repeat center;
        content: '';
        display: block;
        height: 12px;
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translate(0, -50%);
        width: 12px;
      }
    }
  }

  .wl-form-mutil {
    border: {
      top: 1px solid $color-lightGray;
      bottom: 1px solid $color-lightGray;
    }

    .wl-form-group {
      border: 0;
      height: 100%;
      margin-bottom: 0;
      min-height: 44px;
      overflow: auto;
    }

    hr {
      margin: 0;
    }

    .mui-btn {
      background: transparent;
      border: 0;
      height: 44px;
      outline: none;
      text-align: right;
      width: 100%;
    }
  }

  textarea {
    border: 0;
    line-height: 1.5;
    margin-top: 20px;
    width: 100%;

    &::placeholder {
      color: $color-lightGray;
    }
  }
}

.submitBtns {
  margin: 20px 0;
}

// 自定义mui picker & poppicker
.mui-poppicker-header {
  padding: 10px 6px;

  .mui-btn {
    border: 0;
    font-size: 14px !important;
  }
}

.mui-poppicker-btn-ok {
  background: $color-green;
  color: $color-white;
}

.mui-poppicker-btn-cancel {
  background: transparent;
  color: $color-gray;
}

//-------- 提示界面 如：成功、失败
.tips {
  text-align: center;

  img {
    width: 50%;
  }

  h3 {
    margin: 0 0 20px;
  }

  p {
    &:last-of-type {
      margin-bottom: 30px;
    }
  }

  hr {
    border-top: 1px solid $color-lightGray;
  }

  .btn-lg.btn-block {
    margin-bottom: 20px;
  }

  .chargingInfoItem {
    margin-bottom: 30px;

    .col-xs-4 {
      &:after {
        border-right: 1px solid $color-lightGray;
        content: '';
        height: 50%;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translate(0, -50%);
        width: 1px;
      }

      &:last-of-type {
        &:after {
          border-right: 0;
        }
      }

      p {
        margin-bottom: 0;
      }
    }
  }
}

// 订单列表
.order {
  margin-top: 20px;

  li {
    background: $color-white;
    border: {
      top: 1px solid $color-lightGray;
      bottom: 1px solid $color-lightGray;
    }
    line-height: 40px;
    margin-bottom: 10px;
    padding: 0 15px;
  }

  .title {
    border-bottom: 1px solid $color-lightGray;
    margin: 0 -15px;
    padding: 0 15px;
  }

  .order-content {
    color: $color-lightGray;

    span {
      color: $color-gray;
    }
  }

  img {
    width: 18px;
  }

  p {
    margin-bottom: 0;
  }
}

// 充值记录
.rechargerecoed {
  .month,
  .year {
    line-height: 35px;
  }

  .recordlist {
    background: $color-white;
    border: {
      top: 1px solid $color-lightGray;
      bottom: 1px solid $color-lightGray;
    }
  }

  .recordInfo {
    border-bottom: 1px solid lighten($color-lightGray, 20%);
    position: relative;
    padding: 10px 0;

    .amount {
      color: $color-green;
      margin: 0;
      position: absolute;
      right: 0;
      top: 50%;
      transform: translate(0, -50%);
    }

    &:last-of-type {
      border-bottom: 0;
    }
  }
}

// 个人中心
.avatar {
  margin-top: 30px;
  position: relative;
  text-align: center;

  img {
    width: 80px;
  }

  h3 {
    margin: 10px 0 5px;
  }

  p {
    color: $color-lightGray;
  }

  .modify {
    background: url("../imgs/icon/icon_pencil.png") no-repeat center left;
    background-size: 20px;
    color: $color-lightGray;
    padding-left: 20px;
    position: absolute;
    right: 0;
    top: 0;
  }
}

.acountInfo {
  margin: 30px 0;
  text-align: center;

  img {
    width: 16px;
  }
}

.quite {
  margin-top: 50px;
}

.avatar-line {
  height: 64px !important;
  line-height: 64px !important;

  img {
    height: 44px;
    width: 44px;
  }
}


// 文章页
.article {
  padding: 30px 0;

  .title {
    margin-bottom: 30px;
    text-align: center;

    p {
      color: $color-lightGray;
      font-size: 85%;

      span {
        margin-right: 8px;
      }
    }
  }

  b {
    font-weight: 600;
  }
}

// 发票管理
.invoice {
  .title {
    position: relative;


    .btn {
      position: absolute;
      top: 50%;
      right: 15px;
      transform: translate(0, -50%);
    }
  }
}

.invoice-title {
  margin-top: 20px;

  .font-normal {
    font-weight: normal;
  }

  .mui-input-group .mui-input-row {
    height: 100%;
    overflow: auto;
  }

  .mui-checkbox input[type=checkbox], .mui-radio input[type=radio] {
    top: 50%;
    transform: translate(0, -50%);
    margin: 0;
  }

  .invoice-total {
    margin-top: 20px;
  }
}

// 站点地图
.sitemap {
  margin-top: 20px;

  &-title {
    position: relative;
    text-align: center;

    &:after {
      background: $color-lightGray;
      content: '';
      height: 1px;
      left: 0;
      position: absolute;
      top: 50%;
      transform: translate(0, -50%);
      width: 100%;
    }

    span {
      background: $color-white;
      color: $color-lightGray;
      //display: block;
      padding: 0 10px;
      position: relative;
      z-index: 9;
    }
  }

  &-list {
    margin-bottom: 30px;
    @include clearfix;

    li {
      //border-bottom: 1px $color-lightGray solid;
      float: left;
      padding: 20px 0;
      text-align: center;
      width: 33.33%;

      &:nth-child(odd) {
        //border-right: 1px $color-lightGray solid;
      }
    }

    img {
      display: block;
      margin: 0 auto 10px;
    }
  }

  //.col-xs-6 {
  //  margin-bottom: 20px;
  //}
}

// 首页（地图页面）
.mapsearch {
  background: $color-white;
  border-bottom: 1px $color-lightGray solid;
  height: 64px;
  padding: 0 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 9;
}

.stationInfo {
  background: $color-white;
  border-top: 1px $color-lightGray solid;
  bottom: 0;
  height: auto;
  left: 0;
  padding: 15px 20px 20px;
  position: fixed;
  transition: all 350ms;
  width: 100%;
  z-index: 10;

  &:after {
    background: url("../imgs/icon/arrow_up.png") no-repeat center;
    bottom: 5px;
    content: '';
    display: block;
    height: 11px;
    left: 0;
    position: absolute;
    width: 100%;
  }

  .navto {
    background: url("../imgs/icon/navito.png") no-repeat center;
    display: block;
    height: 60px;
    position: absolute;
    right: 20px;
    top: -30px;
    width: 60px;
  }

  .distance {
    color: $color-lightGray;
    position: absolute;
    right: 20px;
    text-align: center;
    top: 35px;
    width: 60px;
  }

  &-title {
    margin: 0 0 5px;

    .badge {
      background: transparent;
      border: 1px $color-green solid;
      border-radius: 3px;
      color: $color-green;
      font-weight: normal;
      margin-left: 5px;
    }
  }

  p {
    color: $color-lightGray;
    margin-bottom: 5px;

    &.status {
      span {
        margin-right: 15px;
      }

      em {
        color: $color-green;
        font-style: normal;
        margin-left: 5px;
      }
    }
  }

  &-desc {
    //border-top: 1px $color-lightGray solid;
    //border-bottom: 1px $color-lightGray solid;
    //color: $color-lightGray;
    height: 0;
    overflow: hidden;

    transition: all 350ms;

    .col-xs-3 {
      color: $color-gray;
      white-space: nowrap;
    }
  }

  &-reservation {
    height: 0;
    overflow: hidden;
    transition: all 2s;
  }
}

.expand {
  .stationInfo-desc {
    border-top: 1px $color-lightGray solid;
    border-bottom: 1px $color-lightGray solid;
    color: $color-lightGray;
    margin-bottom: 20px;
    padding: 10px 0;
    transition: all 350ms;
  }

  .stationInfo-reservation {
    transition: all 2s;
  }

  &.stationInfo {
    &:after {
      display: none;
    }
  }
}

// 地图控件
.map_control {
  background-color: $color-white;
  background-repeat: no-repeat;
  background-position: center;
  border: 1px $color-lightGray solid;
  border-radius: 5px;
  display: block;
  height: 34px;
  position: fixed;
  width: 34px;

  &:active,
  &.open {
    background-color: darken($color-white, 10%);
  }

  &_filter {
    background-image: url("../imgs/icon/icon_filter.png");
    right: 20px;
    top: 84px;
  }

  &_list {
    background-image: url("../imgs/icon/icon_list.png");
    right: 20px;
    top: 133px;
  }

  &_locate {
    background-image: url("../imgs/icon/icon_location.png");
    position: fixed;
    left: 20px;
    //top: -50px;
    z-index: 90;
  }

  &_group {
    position: fixed;
    left: 20px;
    //top: -133px;
    z-index: 90;

    .map_control {
      &:first-of-type {
        background-image: url("../imgs/icon/icon_zoomin.png");
        border-bottom: 0;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
      }
      &:last-of-type {
        background-image: url("../imgs/icon/icon_zoomout.png");
        margin-top: 34px;
        border-top-left-radius: 0;
        border-top-right-radius: 0;
      }
    }
  }

  &_submenu {
    background: $color-white;
    border: 1px $color-lightGray solid;
    border-radius: 5px;
    line-height: 44px;
    position: absolute;
    right: 45px;
    text-align: center;
    width: 100px;

    &:after,
    &:before {
      border: solid transparent;
      content: ' ';
      height: 0;
      left: 100%;    //根据三角形的位置，可以随意更改。
      position: absolute;
      width: 0;
    }

    &:after {
      border-width: 6px;
      border-left-color: #fff;
      top: 14px;//根据三角的位置改变
    }

    &:before {
      border-width: 8px;
      border-left-color: $color-lightGray;
      top: 12px;
    }

    li {
      border-bottom: 1px $color-lightGray solid;

      &:last-of-type {
        border-bottom: 0;
      }
    }

    a {
      color: inherit;
    }
  }
}
